import java.io.File;
import java.io.FileWriter;
import java.io.Writer;

/**
 * 抓取得到的数据保存到文件中
 */
public class WirteToFile {

    public static void out(String title,String audio,String endTime){
        try{
            File file = new File("D:/ideaIU/workspace/music/src/music.txt");
            if(!file.exists()){
                file.createNewFile();
            }
            Writer write = new FileWriter(file,true);
            write.write(title+" "+audio+" "+endTime+"\r\n");
            write.close();
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
